﻿@using UcAsp.Net.Model;
@using UcAsp.Net.BLL;
@using UcAsp.Net.Comm
@{
    var Categories = (UcAsp.Net.Model.Categories)ViewData["Categories"];
    ViewBag.Title = Categories.CategorieName;
    ViewBag.KeyWords = Categories.KeyWords;
    ViewBag.Description = Utils.RemoveHtml(Categories.Remark);
}
@model List<UcAsp.Net.Model.ArticelsViews>
<div class="container" style="width: 900px; min-height: 500px; background-color:Black;	background-color: #ececec; /*background-image: url(../img/menu_bg.png);*/
	background-repeat: repeat;
	border-radius: 0px 5px 5px 0px;">

    <div style="width:790px;height:460px;float:left;">
        
        <div class="teacher_more" style="position: relative;max-height: 460px;">
            @foreach (UcAsp.Net.Model.ArticelsViews views in Model)
            { 
                
                <div class="teacher">
                    <a href="/@Categories.ShowPath/@if (string.IsNullOrEmpty(views.ShowPath))
                                                                  {@views.ID<text>.shtml</text>}
                                                                  else
                                                                  {@views.ShowPath<text>.shtml</text>}"><img src="@views.IconUrl" border="0" alt="@views.Title" /></a>
                    <div style=" text-align:center"><a href="/@Categories.ShowPath/@if (string.IsNullOrEmpty(views.ShowPath))
                                                                  {@views.ID<text>.shtml</text>}
                                                                  else
                                                                  {@views.ShowPath<text>.shtml</text>}">
                                                @(UcAsp.Net.Comm.Utils.ClearPart(views.Title, 20))
                                                </a></div>
                </div>
                
                
            }
        </div>
        
    </div>
    <div class="hand_right" style="float:left; margin-left:25px; width:35px; height:460px;">
    
    </div>
</div>
@section metas
{
    <script type="text/javascript">
     var teachercount=Math.ceil(@Model.Count/10);
     $(function () {
     if(teachercount<2)
     {
       $(".hand_left").hide(); 
       $(".hand_right").hide();
     }
         $(".teacher_more").css("width", 800 * teachercount); ///

         $(".hand_left").click(function () {
             var hand = $(".teacher_more");
             var left = hand.css("left").replace("px", "");
             if (800 * teachercount > Math.abs(parseInt(left)) + 800) {
                 hand.animate({ "left": parseInt(left) - 160 }, { duration: 300,
                     easing: "easeInCubic"
                 });
             }
         });
         $(".hand_right").click(function () {
             var hand = $(".teacher_more");
             var left = hand.css("left").replace("px", "");
             if (left < 0) {
                 hand.animate({ "left": parseInt(left) + 160 }, { duration: 300,
                     easing: "easeInCubic"
                 });
             }

         });
     });
    </script>
}